/*************************************************
Author: will
Date: 9/12/2012
Description:
Notes: 
*************************************************/

#ifndef __CTaskTargetTrigger_h__
#define __CTaskTargetTrigger_h__

#include "CTaskID.h"

class CUserTask;
class CTaskCond;
class CTaskTargetTrigger
{
public:
    enum TRIGGER_TARGET_TYPE
    {
        TASK_TRIGGER_TARGET_OPEN,          //用于激活任务用
        TASK_TRIGGER_TARGET_FINISH,        //用于完成任务用
    };

	CTaskTargetTrigger() 
    {
	}

    CTaskTargetTrigger(unsigned char ucTargetType, unsigned char ucTaskIndex, unsigned char ucTargetIndex, CTaskID& stTaskID) 
        :_ucTargetType(ucTargetType), _ucTaskIndex(ucTaskIndex), _ucTargetIndex(ucTargetIndex), _stTaskID(stTaskID)
    {
    }

	virtual ~CTaskTargetTrigger() 
    {
	}

    int Trigger(CUserTask& stUserTask, CTaskCond& stCond);

public:
    unsigned char       _ucTargetType;         
    unsigned char       _ucTaskIndex;
    unsigned char       _ucTargetIndex;
    CTaskID             _stTaskID;
};


#endif // __CTaskTargetTrigger_h__

